package com.zwj.service.impl;

import com.zwj.dao.ByBackend.ByBackendMapper;
import com.zwj.pojo.Backend;
import com.zwj.pojo.User;
import com.zwj.service.ByBackendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ByBackendServiceimpl implements ByBackendService {
    @Autowired
  private   ByBackendMapper byBackendMapper;
    @Override
    public Backend logo(String userCode, String userPassword) throws Exception {
        Backend backend = byBackendMapper.selectCode(userCode,userPassword);
        if ( null!=backend ) {
            if (!backend.getUserPassword().equals(userPassword)) {
                backend = null;
            }
        }
        return backend;
    }
}
